import { Routes } from '@angular/router';

import { UserRouteAccessService } from '../../shared';
import { PicComponent } from './pic.component';
import { PicDetailComponent } from './pic-detail.component';
import { PicPopupComponent } from './pic-dialog.component';
import { PicDeletePopupComponent } from './pic-delete-dialog.component';

export const picRoute: Routes = [
    {
        path: 'pic',
        component: PicComponent,
        data: {
            authorities: ['ROLE_USER'],
            pageTitle: 'notebookWxappApp.pic.home.title'
        },
        canActivate: [UserRouteAccessService]
    }, {
        path: 'pic/:id',
        component: PicDetailComponent,
        data: {
            authorities: ['ROLE_USER'],
            pageTitle: 'notebookWxappApp.pic.home.title'
        },
        canActivate: [UserRouteAccessService]
    }
];

export const picPopupRoute: Routes = [
    {
        path: 'pic-new',
        component: PicPopupComponent,
        data: {
            authorities: ['ROLE_USER'],
            pageTitle: 'notebookWxappApp.pic.home.title'
        },
        canActivate: [UserRouteAccessService],
        outlet: 'popup'
    },
    {
        path: 'pic/:id/edit',
        component: PicPopupComponent,
        data: {
            authorities: ['ROLE_USER'],
            pageTitle: 'notebookWxappApp.pic.home.title'
        },
        canActivate: [UserRouteAccessService],
        outlet: 'popup'
    },
    {
        path: 'pic/:id/delete',
        component: PicDeletePopupComponent,
        data: {
            authorities: ['ROLE_USER'],
            pageTitle: 'notebookWxappApp.pic.home.title'
        },
        canActivate: [UserRouteAccessService],
        outlet: 'popup'
    }
];
